
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="game" class="src.Game" scope="application"/>
<!DOCTYPE html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>

        <%
            if (null != session.getAttribute("playerID")) {

        %>

        <h1>Hello World!</h1>
        <form  name="mainForm" method="post" target="result" action="compute" >
            <hr>
            Enter Clicks/Sec : <input type="text" name="click">
            <hr>
            <input type="submit" name="command" value="COMPUTE" ></input>

        </form>
        <%} else {%>
        <%
            String username = request.getParameter("user");
            response.sendRedirect("");
        %>

        <form  name="loginForm" method="post" >
            <table>
                <tr>
                    <td>Login ID</td>
                    <td><input type="text" name="user" ></td>
                </tr>
                <tr>
                    <td><input type="submit" name="register" value="Login"></td>
                </tr>                
            </table>
        </form>
        <%}%>
    </body>
</html>
